using UnityEngine;
using GameFramework;
using LS.Event;

namespace LS
{
    public class DataNodeChangedEventArgs : LSGameEventArgs<DataNodeChangedEventArgs>
    {
        public string NodeName { get; set; }
        public Variable NewValue { get; set; }
        public Variable OldValue { get; set; }
        
        public override void Clear()
        {
            NodeName = null;
            NewValue = null;
            if (OldValue != null)
            {
                ReferencePool.Release(OldValue);
                OldValue = null;
            }
        }
    }
}
